﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBlock : MonoBehaviour
{
    public GameObject obj;
    public int numberOfObjeck = 12;
    public float radius = 5;

    void Start()
    {
        Transform parentTransform = GameObject.Find("Block").GetComponent<Transform>();
        for (int i = 1; i <= numberOfObjeck; i++)
        {
            
            float angle = i * Mathf.PI * 2 / numberOfObjeck;
            
            Vector3 pos = new Vector3(Mathf.Cos(angle), 0.1f, Mathf.Sin(angle)) * radius;
            Instantiate(obj, pos, Quaternion.identity, parentTransform);
        }
    }
}
